package com.hong.poi;

import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @Auther: csh
 * @Date: 2019/12/11 16:59
 * @Description:使用POI创建excel
 */
public class PoiTest01 {

    public static void main(String[] args) throws IOException {
        //1.创建工作簿
        Workbook wb = new XSSFWorkbook();
        //2.创建表单sheet
        Sheet sheet = wb.createSheet("test");
        //3.文件流
        FileOutputStream pis = new FileOutputStream("D:\\BaiduNetdiskDownload\\008、【店主推荐】springboot2+Vue+shiro云管理系统项目实战\\资料源码文档\\3-8 员工管理及POI\\POI入门\\资源\\Excel相关\\test.xlsx");
        //4.写入文件
        wb.write(pis);
        pis.close();
    }
}
